﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MessageHandler
{
	public class HandlerAdapter : IMessageHandler
	{
		Controller controller;

		public HandlerAdapter(Controller controller)
		{
			this.controller = controller;
		}

		#region MessageHandler Member

		public void HandleMessage(byte[] message)
		{
			controller.HandleIncomingMessage(message);
		}

		public void HandleError(ChatException err)
		{
			controller.HandleError(err);
		}

		#endregion
	}
}
